package com.fneuch.w40k.mathammer;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.beans.BeanUtils;

import com.fneuch.mwg.profiles.ModelProfile;
import com.fneuch.mwg.profiles.infantry.AbstractStatsProfile;

public class ModelFormBean extends AbstractStatsProfile {

	@NotNull
	@Min(1)
	@Max(40)
	private int quantity;
	
	@NotEmpty
	private String unitRole;

	public ModelFormBean() {
	}
	
	public ModelFormBean(ModelProfile model) {
		BeanUtils.copyProperties(model, this);
	}

	public String getUnitRole() {
		return unitRole;
	}

	public void setUnitRole(String unitRole) {
		this.unitRole = unitRole;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	
}
